hiliteColor
Type
property
Summary
Specifies the color of the background when an object, or text in an object, is highlighted.
Syntax
set the hiliteColor [of <object>] to {empty | <colorName> | <RGBColor>}
Description
Use the hiliteColor property to specify the background color of the selected text in a field, or the highlighted color of a clicked object.
Setting the hiliteColor of an object to empty allows the hiliteColor of the object's owner to show through. Use the effective keyword to find out what color is used for the object, even if its own hiliteColor is empty.
The setting of the hiliteColor property has different effects, depending on the object type:
-
The hiliteColor of a stack, card, or group determines the hiliteColor of any object in the stack, card, or group that does not have its own hiliteColor.
-
The hiliteColor of a button is used for the background of the button when it is highlighted. If the button is a menu, the hiliteColor is used to highlight the button, but not the active menu choice. The hiliteColor has no effect if the button is a tabbed button. The hiliteColor has no effect until the button is highlighted.
If the lookAndFeel is set to "Appearance Manager", standard and rectangle buttons are drawn by the operating system if the backgroundColor and backgroundPattern of the button and all of its owners is empty. In this case, the button's hiliteColor has no effect. Otherwise, the button is drawn by LiveCode. If the lookAndFeel is "Appearance Manager", button menus whose menuMode is set to "option" are always drawn by the operating system, and the setting of the button's hiliteColor does not affect them.
-
The hiliteColor of a field determines the background color of text selections in the field. If the hiliteColor of the field and all its owners is empty, the global hiliteColor property is used.
-
The hiliteColor of a scrollbar fills the arrow boxes at the ends of the scrollbar when the arrows are clicked. The hiliteColor has no effect until the arrows are clicked.
-
The hiliteColor of a graphic outlines its marker shapes. (The hiliteColor has no effect unless the graphic's style is "curve" or "polygon" and its markerDrawn property is true.)
-
The hiliteColor of a player or EPS object has no effect.
-
The hiliteColor of an image is the third color in the image's color palette.
If the object's hilitePattern is set, the pattern is shown instead of the color specified by hiliteColor.
The global hiliteColor property specifies the background color of selected text in fields whose hiliteColor is empty, but does not affect other highlighted objects.
Examples
set the hiliteColor of field "Comments" to "red"
set the hiliteColor of button ID 3 to "#336633"
set the hiliteColor to 255,255,0
Related
keyword: effective, field, button, menu, card, player, scrollbar, graphic, image
object: button, image, field, stack, graphic
property: hiliteFill, topColor, armFill, markerLineSize, backgroundPattern, menuMode, backgroundColor, style, lookAndFeel, markerDrawn
glossary: object, selection, property, select, tabbed button, highlight, object type, color reference, integer, color palette, button menu, keyword, hexadecimal, EPS, owner
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile